Alphabet = function (symbols, defaultSymbol) {
    this._symbols = symbols;
    if (!this.containsSymbol(defaultSymbol)) {
        alert('Default symbol is expected to be contained in alphabet');
        return;
    }
    this._defaultSymbol = defaultSymbol;
};

Alphabet.prototype = {
    length:function () {
        return this._symbols.length;
    },

    getSymbols:function () {
        return this._symbols;
    },

    getDefaultSymbol:function () {
        return this._defaultSymbol;
    },

    containsSymbol:function (symbol) {
        return (this._symbols.indexOf(symbol) !== -1);
    }
};
